package net.hn.hnms.sys.system.request;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.Size;

@Data
@JsonAutoDetect(getterVisibility= JsonAutoDetect.Visibility.NONE)
@ApiModel("组织机构入参")
public class OneAccessOrgReq {

    @ApiModelProperty(value = "随机ID")
    private String iamRequestId;

    @ApiModelProperty(value = "授权密码")
    private String iamRemotePwd;

    @ApiModelProperty(value = "授权账号")
    @JsonProperty("iamRemoteUser")
    private String createBy;

    @ApiModelProperty(value = "组织机构名称")
    @JsonProperty("orgName")
    private String deptName;

    @ApiModelProperty(value = "上级组织id")
    @JsonProperty("parentOrgId")
    @JsonSerialize(using = ToStringSerializer.class)
    private String parentId;


    @ApiModelProperty(value = "组织Id")
    @JsonProperty("orgId")
    @JsonSerialize(using = ToStringSerializer.class)
    private String deptId;

    @ApiModelProperty(value = "负责人")
    private String leader;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
    private String phone;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    private String email;




}
